/**
 * Created by Administrator on 2019/1/31.
 */
$(function () {
   // 加载信息
    loadMould();
});

var loadMould = function () {
    var jsonstr = postSyncAjax("/mouldSwiper/load", null);
    console.log(jsonstr);
    if(jsonstr.success) {
        $("#mould_board").html("");
        $.each(jsonstr.data.rows, function (index, item) {
            var targetObj = $("#mould_board").append("" +
                "<div class=\"swiper-slide\">" +
                "<div class='swiper-slide-content'>" +
                "<img src='"+item.picAddr+"'/>" +
                "</div>" +
                "<div class='swiper-slide-message'>" +
                "<div class='swiper-slide-title'>编号：" + item.mouldNo +
                "</div><br/><div class='swiper-slide-man'>规格：" + item.spec +
                "</div><br/><div class='swiper-slide-man'>型号：" + item.modelNo +
                "</div><br/><div class='swiper-slide-man'>材质：" + item.material +
                "</div><br/><div class='swiper-slide-man'>颜色：" + item.mouldColor +
                "</div><br/><div class='swiper-slide-man'>分类：" + item.mouldClz +
                "</div><br/><div class='swiper-slide-man'>范围：" + item.scope +
                "</div><br/><div class='swiper-slide-man'>备注：" + item.remark +
                "</div><br/><div class='swiper-slide-man'>登记人：" + item.entryNickname +
                "</div><br/><div class='swiper-slide-time'>登记时间：" +
                top.dateFtt("yyyy-MM-dd hh:mm:ss", new Date(item.entryTime)) + "</div>" +
                "</div>" +
                "</div>");
            $.parser.parse(targetObj);// 重新渲染某个特定的组件，解决样式丢失的问题
        });
    } else {
        $("body").html("").css("background-color","#fff");
    }
}